package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.Project;
import com.gxuwz.zhangjiahui.entity.Student;
import com.gxuwz.zhangjiahui.mapper.ProjectMapper;
import com.gxuwz.zhangjiahui.mapper.StudentMapper;
import com.gxuwz.zhangjiahui.service.IProjectService;
import com.gxuwz.zhangjiahui.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {

    @Autowired
    private ProjectMapper projectMapper;

    @Override
    public Project findProjectById(Project project) {
        return projectMapper.findProjectById(project);
    }

    @Override
    public List<Project> findProjectAll() {
        return projectMapper.findProjectAll();
    }

    @Override
    public List<Project> findProjectByStuNoOrTeamId(Project project) {
        return projectMapper.findProjectByStuNoOrTeamId(project);
    }

    @Override
    public IPage<Project> selectProjectPage(Page<Project> page, Wrapper<Project> wrapper) {
        return projectMapper.selectProjectPage(page, wrapper);
    }

    @Override
    public void addProject(Project project) {
        projectMapper.addProject(project);
    }

    @Override
    public void updateProjectById(Project project) {
        projectMapper.updateProjectById(project);
    }

    @Override
    public void deleteProjectById(Project project) {
        projectMapper.deleteProjectById(project);
    }
}
